-
-
Notifications
You must be signed in to change notification settings - Fork 457
Allow custom sort natives and callback use optional data #1124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Allow custom sort natives and callback use optional data #1124
Conversation
|
This PR will break older plugins because of SP bug (alliedmodders/sourcepawn#684) |
|
Updated as Using |
|
Egh pull request reverted, don't even know myself if it's worth for me to update this to bring back the |
|
Updated branch to latest, restored |
323 main things done withSortCustom1D,SortCustom2D, andArrayList.SortCustomnatives:anyvariable to custom sort rather than limited toint. Meaning floats, enums, methodmap etc can be used to pass and custom sort.Merged from Update sourcepawn submodule #2146Handle hndlpass toany data, and not required in callback params. I don't see anywhere on why it should be limited to handles, so allowanywithout needing to create new handles. Also updated core to usecell_tdata, doesn't make any difference but may well then do it.ArrayListinstead ofHandleinSortFuncADTArraycallback.Handlevariable can still be used from old plugins.Only thing missing is
anyfor regular 1D sorting. I'm not sure if it a good idea to allowanyinSortIntegersnative to sort enums, but i left it untouched.SortADTArrayCustomalso left untouched because we haveArrayList.SortCustomtraditional syntax instead.Hopefully i didn't miss anything that would break old plugins, but please do let me know if i did break one.
Compiled with this, no warnings and tested.